# Various enhancement possibilities:
# $ua->max_size(100000);  # 100k byte limit
# $ua->timeout(3);        # 3 sec timeout is default
# $ua->proxy(['http'], 'http://myproxy.mycorp.com/');  # set proxy
# $ua->env_proxy()        # load proxy info from environment variables
# $ua->no_proxy('localhost', 'mycorp.com');   # No proxy for local machines

$ua->agent("Mozilla/6.0");  # Or something equally mysterious

my $req = HTTP::Request->new('GET','http://www.yahoo.com/');
my $res = $ua->request($req);
 
if ($res->is_success) 
{
  $content= $res->content;

  print "Content-type: text/html", "\n\n";
  print "$content";

} 
else 
{
  print "Content-type: text/html", "\n\n";
  print "not successful
res->status_line :

" . $res->status_line . "\n";
  die "Could not get content";
}
